<link rel="stylesheet" media="screen" type="text/css" title="fiche_Css" href="_css/fiche2.css" />
<link rel="stylesheet" type="text/css" href="_js/grid/gt_grid.css" />
<link rel="stylesheet" type="text/css" href="_js/grid/skin/vista/skinstyle.css" />
<script type="text/javascript" src="_js/grid/gt_msg_en.js"></script>
<script type="text/javascript" src="_js/grid/gt_grid_all.js"></script>
<script type="text/javascript" src="_js/grid/flashchart/fusioncharts/FusionCharts.js"></script>
<script type="text/javascript" src="_js/grid/calendar/calendar.js"></script>
<script type="text/javascript" src="_js/grid/calendar/calendar-setup.js"></script> 
<script type="text/javascript" >

var grid_demo_id = "myGrid1" ;


var dsOption= {

	fields :[
		{name : 'Id_palette'  },
		{name : 'Poids_Brut' },
		{name : 'Poids_net' },
		{name : 'Hauter_max' },
		{name : 'Largeur_Max' },
		{name : 'Longueur_Max' },
		{name : 'Poid_Brut_Max' },
		{name : 'Poid_Support' },
		{name : 'Nature'},
				],
	recordType : 'array'
}



var colsOption = [
	{id: 'Id_palette' , header: "Palette" , width :60  },
	{id: 'Poids_Brut', header: "Poids Brut", width : 50},
	{id : 'Poids_net', header: "Poids Net", width : 50},
	{id : 'Hauter_max', header: "Hauteur Max", width : 50},
	{id : 'Largeur_Max', header: "Largeur max", width : 50},
	{id : 'Longueur_Max',header: "longueur max", width : 50},
	{id : 'Poid_Brut_Max', header: "Poids Brut Max", width : 50},
	{id : 'Poid_Support', header: "Poids support", width: 50},
	{id : 'Nature', header: "Nature", width :50},
];


var gridOption={
	id : grid_demo_id,
	loadURL : "_fct/Transporteur/ShowComController.php",
	width: 469,//"100%", // 700,
	height: 200,//"100%", // 330,
	container : 'gridbox', 
	replaceContainer : true, 
	encoding : 'UTF-8', // Sigma.$encoding(), 
	dataset : dsOption ,
	columns : colsOption ,
	skin: "vista",
	pageSize:100,
	toolbarContent : 'reload',
	parameters : {'idcom':"<?php echo $_GET['idcom']; ?>"},
};


var mygrid=new Sigma.Grid( gridOption );
Sigma.Util.onLoad(function(){mygrid.render()});

//////////////////////////////////////////////////////////

</script>
<script type="text/javascript">
	function MkOffre(Id)
	 {
	 	 var montant = prompt("Veuillez indiquer le montant de la livraison :")
	 	 if (montant != null && montant != '')
	  		{
				document.forms["form1"].prix.value= montant;
				document.forms["form1"].action = "<?php echo ABS_PATH.ROOT; ?>?page=Transporteur/offre&fct=Transporteur/offre&idcom="+Id+"&action=valider&replace=yes";
				document.forms["form1"].submit();
	  		}
	  	else
	   	alert("Montant invalide !");
	 }
	</script>
	<form method="post" name="form1">
	<input type="hidden" name="prix" />
	</form>
	<div id='top'>Fiche de la commande N&#176; <?php echo $res_com['Id_Commande']; ?></div>
		<table id="refs">
		<tr>
		<th>Nom du client : </th> <td><?php echo $res_com['Raison_Social']; ?></td>
		<th>GLN_Client : </th> <td><?php echo $res_com['GLN_Client']; ?></td>
		</tr>
		<tr>
		<th>Industriel : </th> <td><?php echo $res_com['us_nom']; ?></td>
		<th>GLN DO : </th> <td><?php echo $res_com['GLN_DO']; ?></td>
		</tr>
		<tr>
		<th>Entrepot : </th> <td><?php echo $res_com['en_nom']; ?></td>
		<th>GLN Entrepot : </th> <td><?php echo $res_com['GLN_Entrepot']; ?></td>
		</tr>
		</table>
	<p id="description" ><strong>Description de l'ordre de preparation :</strong><br/> <?php echo $res_pre['Description']?></p>
	<center>
		<div id="bigbox">
      		<div id="gridbox"></div>
    	</div>
    </center>
    <br />
    <table id="stats">
		<tr>
		<th>Debut ordre preparation : </th><td><?php echo $res_pre['Date_diffusion_ordre_prepa']; ?></td>
		<th>Fin de prepartion : </th><td><?php echo $res_pre['Date_fin']; ?></td>
		</tr>
		<tr>
		<th>Livraison commande : </th><td><?php echo $res_com['Date_fin_Liv']; ?></td>
		<th>Etat commande : </th><td><?php echo $etat_val ?></td>
		</tr>
		<tr>
		<th>Suggestion de cout : </th><td><?php echo $res_prix['prix']; ?></td>
		<th>Offre :</th><td><?php echo $offre_liv; ?></td>
		</tr>
		<tr><th>Cout de livraison proposé :</th><td><?php echo $cout_liv; ?></td></tr>
	</table>
	    <div id="chrono">
	<?php include_once('_tpl/chrono.php'); ?>
	</div>
		<!-- <input type="BUTTON" value="Retour a la liste des commande" onclick="javascript:history.back()"> -->